package com.cherrypt.api.core.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cherrypt.api.model.dataobject.Role;

import java.util.List;

/**
 * @author intent
 * @date 2019/8/4 13:20
 * @about <link href='http://zzyitj.xyz/'/>
 */
public interface RoleService extends IService<Role> {
    /**
     * 根据id获取Redis中的RoleList
     *
     * @param uid uid
     * @return
     */
    List<Role> getRedisRoleListByUid(int uid);

    /**
     * 存储RoleList
     * @param uid
     * @param roleList
     */
    void saveRedisRoleList(int uid, List<Role> roleList);

    /**
     * 获取用户权限
     *
     * @param uid
     * @return
     */
    List<Role> getRoleByUid(int uid);
}
